﻿namespace Sidvall.AuthorizationManager.UI.Entities
{
	public sealed partial class AuthorizationScopeResourceItem
	{
		#region Public Members

		#region CanEditClaims

		public bool CanEditClaims
		{
			get
			{
				switch (this.AccessLevel)
				{
					case Sidvall.AuthorizationManager.Data.ResourceAccessLevel.AuthenticatedAndClaims:
					case Sidvall.AuthorizationManager.Data.ResourceAccessLevel.Claims:
						return true;
					default:
						return false;
				}
			}
		}

		#endregion

		#region OnAfterAccessLevelPropertyChanged

		partial void OnAfterAccessLevelPropertyChanged()
		{
			OnPropertyChanged("CanEditClaims", true, false);
		}

		#endregion

		#endregion
	}
}